#include"ProgressBar.h"
void download()
{
	double total = 3000;
	double current = 0;
	while(total > current)
	{
		progress_bar(total, current);
		current += 31;
		usleep(30000);
	}
	progress_bar(total, current);//当total==current时，上述循环不再进行，但此时仍需一次打印，但又不想再增加current造成错误
	printf("\n");
}

void test1()
{
	download();
}

int main()
{
	test1();
	return 0;
}
